package com.ex.mzwqz.fragment;

import android.view.View;
import android.widget.RelativeLayout;

import com.ex.mzwqz.R;
import com.ex.mzwqz.util.Constants;
import com.ex.mzwqz.util.UiManager;

/**
 * Created by xiaguoqiang on 16/10/19.
 */
public class ManagerFragment extends BaseFragment implements View.OnClickListener{

    //咨询管理
    private RelativeLayout rlNewManager,rlPolicyManager,rlNoticeManager;

    //审核管理
    private RelativeLayout rlFirstTrial,rlReviewed,rlLicenseManager,rlYearCheck,rlCheckChange;

    @Override
    protected int setContentViewResId() {
        return R.layout.fragment_manager;
    }

    @Override
    protected void initView() {
        findViewById(R.id.header_right).setVisibility(View.VISIBLE);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initEvent() {
        findViewById(R.id.rl_manager_news).setOnClickListener(this);
        findViewById(R.id.rl_manager_policy).setOnClickListener(this);
        findViewById(R.id.rl_manager_notice).setOnClickListener(this);
        findViewById(R.id.rl_manager_first_check).setOnClickListener(this);
        findViewById(R.id.rl_manager_check).setOnClickListener(this);
        findViewById(R.id.rl_manager_checked).setOnClickListener(this);
        findViewById(R.id.rl_manager_check_year).setOnClickListener(this);
        findViewById(R.id.rl_manager_check_change).setOnClickListener(this);
    }

    public void onClick(View v){
        switch (v.getId()){
            case R.id.rl_manager_news:
                UiManager.toInfoManager(getActivity(), Constants.SYS_INFO_TYPE_NEWS);
                break;
            case R.id.rl_manager_policy:
                UiManager.toInfoManager(getActivity(), Constants.SYS_INFO_TYPE_POLICY);
                break;
            case R.id.rl_manager_notice:
                UiManager.toInfoManager(getActivity(), Constants.SYS_INFO_TYPE_NOTICE);
                break;
            case R.id.rl_manager_check:
                UiManager.toCheckManagerView(getActivity(),Constants.SYS_CHECK_STATUS_CHECK);
                break;
            case R.id.rl_manager_first_check:
                UiManager.toCheckManagerView(getActivity(),Constants.SYS_CHECK_STATUS_PRELIMINARY);
                break;
            case R.id.rl_manager_check_year:
                UiManager.toCheckManagerView(getActivity(),Constants.SYS_CHECK_STATUS_YEAR);
                break;
            case R.id.rl_manager_check_change:
                UiManager.toCheckManagerView(getActivity(),Constants.SYS_CHECK_STATUS_CHANGE);
                break;
            case R.id.rl_manager_checked:
                UiManager.toCheckManagerView(getActivity(),Constants.SYS_CHECK_STATUS_CHECKED);
                break;
        }
    }
}
